3.22.12 \(\int \frac {a+b x+c x^2}{d+e x} \, dx\) [2112]

Optimal. Leaf size=52 \[ -\frac {(c d-b e) x}{e^2}+\frac {c x^2}{2 e}+\frac {\left (c d^2-b d e+a e^2\right ) \log (d+e x)}{e^3} \]

[Out]

-(-b*e+c*d)*x/e^2+1/2*c*x^2/e+(a*e^2-b*d*e+c*d^2)*ln(e*x+d)/e^3

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {712} \begin {gather*} \frac {\log (d+e x) \left (a e^2-b d e+c d^2\right )}{e^3}-\frac {x (c d-b e)}{e^2}+\frac {c x^2}{2 e} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x + c*x^2)/(d + e*x),x]

[Out]

-(((c*d - b*e)*x)/e^2) + (c*x^2)/(2*e) + ((c*d^2 - b*d*e + a*e^2)*Log[d + e*x])/e^3

Rule 712

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin {align*} \int \frac {a+b x+c x^2}{d+e x} \, dx &=\int \left (\frac {-c d+b e}{e^2}+\frac {c x}{e}+\frac {c d^2-b d e+a e^2}{e^2 (d+e x)}\right ) \, dx\\ &=-\frac {(c d-b e) x}{e^2}+\frac {c x^2}{2 e}+\frac {\left (c d^2-b d e+a e^2\right ) \log (d+e x)}{e^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 48, normalized size = 0.92 \begin {gather*} \frac {e x (-2 c d+2 b e+c e x)+2 \left (c d^2+e (-b d+a e)\right ) \log (d+e x)}{2 e^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x + c*x^2)/(d + e*x),x]

[Out]

(e*x*(-2*c*d + 2*b*e + c*e*x) + 2*(c*d^2 + e*(-(b*d) + a*e))*Log[d + e*x])/(2*e^3)

________________________________________________________________________________________

Maple [A]
time = 0.46, size = 49, normalized size = 0.94

method result size
default \(\frac {\frac {1}{2} c e \,x^{2}+b e x -c d x}{e^{2}}+\frac {\left (e^{2} a -b d e +c \,d^{2}\right ) \ln \left (e x +d \right )}{e^{3}}\) \(49\)
norman \(\frac {\left (b e -c d \right ) x}{e^{2}}+\frac {c \,x^{2}}{2 e}+\frac {\left (e^{2} a -b d e +c \,d^{2}\right ) \ln \left (e x +d \right )}{e^{3}}\) \(50\)
risch \(\frac {c \,x^{2}}{2 e}+\frac {b x}{e}-\frac {c d x}{e^{2}}+\frac {\ln \left (e x +d \right ) a}{e}-\frac {\ln \left (e x +d \right ) b d}{e^{2}}+\frac {\ln \left (e x +d \right ) c \,d^{2}}{e^{3}}\) \(63\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*x^2+b*x+a)/(e*x+d),x,method=_RETURNVERBOSE)

[Out]

1/e^2*(1/2*c*e*x^2+b*e*x-c*d*x)+(a*e^2-b*d*e+c*d^2)*ln(e*x+d)/e^3

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 51, normalized size = 0.98 \begin {gather*} {\left (c d^{2} - b d e + a e^{2}\right )} e^{\left (-3\right )} \log \left (x e + d\right ) + \frac {1}{2} \, {\left (c x^{2} e - 2 \, {\left (c d - b e\right )} x\right )} e^{\left (-2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)/(e*x+d),x, algorithm="maxima")

[Out]

(c*d^2 - b*d*e + a*e^2)*e^(-3)*log(x*e + d) + 1/2*(c*x^2*e - 2*(c*d - b*e)*x)*e^(-2)

________________________________________________________________________________________

Fricas [A]
time = 4.40, size = 51, normalized size = 0.98 \begin {gather*} -\frac {1}{2} \, {\left (2 \, c d x e - {\left (c x^{2} + 2 \, b x\right )} e^{2} - 2 \, {\left (c d^{2} - b d e + a e^{2}\right )} \log \left (x e + d\right )\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)/(e*x+d),x, algorithm="fricas")

[Out]

-1/2*(2*c*d*x*e - (c*x^2 + 2*b*x)*e^2 - 2*(c*d^2 - b*d*e + a*e^2)*log(x*e + d))*e^(-3)

________________________________________________________________________________________

Sympy [A]
time = 0.09, size = 44, normalized size = 0.85 \begin {gather*} \frac {c x^{2}}{2 e} + x \left (\frac {b}{e} - \frac {c d}{e^{2}}\right ) + \frac {\left (a e^{2} - b d e + c d^{2}\right ) \log {\left (d + e x \right )}}{e^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x**2+b*x+a)/(e*x+d),x)

[Out]

c*x**2/(2*e) + x*(b/e - c*d/e**2) + (a*e**2 - b*d*e + c*d**2)*log(d + e*x)/e**3

________________________________________________________________________________________

Giac [A]
time = 1.52, size = 51, normalized size = 0.98 \begin {gather*} {\left (c d^{2} - b d e + a e^{2}\right )} e^{\left (-3\right )} \log \left ({\left | x e + d \right |}\right ) + \frac {1}{2} \, {\left (c x^{2} e - 2 \, c d x + 2 \, b x e\right )} e^{\left (-2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)/(e*x+d),x, algorithm="giac")

[Out]

(c*d^2 - b*d*e + a*e^2)*e^(-3)*log(abs(x*e + d)) + 1/2*(c*x^2*e - 2*c*d*x + 2*b*x*e)*e^(-2)

________________________________________________________________________________________

Mupad [B]
time = 0.66, size = 51, normalized size = 0.98 \begin {gather*} x\,\left (\frac {b}{e}-\frac {c\,d}{e^2}\right )+\frac {c\,x^2}{2\,e}+\frac {\ln \left (d+e\,x\right )\,\left (c\,d^2-b\,d\,e+a\,e^2\right )}{e^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x + c*x^2)/(d + e*x),x)

[Out]

x*(b/e - (c*d)/e^2) + (c*x^2)/(2*e) + (log(d + e*x)*(a*e^2 + c*d^2 - b*d*e))/e^3

________________________________________________________________________________________